Protocol duplicating configuration and method for replicating and order of reception of packets on a first and second computers using a shared memory queue

ABSTRACT

A method of duplicating protocol for making identical the order of reception and contents of packets on the two computers of a duplicated computer system with respect to packets of specific types of communication. On the first computer, each packet taken in is checked to determine whether the packet is a packet of the specific types of communication before protocol processing. If the packet is a packet of the specific types of communication, the packet is passed to the protocol processing process and added to a virtual queue created in its shared memory. On the second computer, if the packet is a packet of the specific types of communication, the packet is discarded, and the one at the head of the virtual queue in its shared memory is passed to the protocol processing process.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national phase application of PCT Application No.PCT/JP02/00770 filed Jan. 31, 2002, which claims priority from JapaneseApplication No. 2001-134665 filed Mar. 26, 2001.

FIELD OF THE INVENTION

The present invention generally relates to a duplicated computer system,and in particular to the technology for duplicating protocol on aduplicated computer system.

BACKGROUND

There are various conventional methods of constructing a duplicatedcomputer system using two computers each connected to a network. In sucharchitectures, however, the order of reception of packets which are sentfrom the same sender and received by the two computers are not alwaysthe same. Although no problem occurs in uses for which the order ofreception of packets does not matter if an switchover between thecomputers occurs in case of failure, it is not enough just to duplicatethe hardware for uses in which the order of reception of packets doesmatter.

The present invention was made to solve this problem. The object of thepresent invention is to provide a method of duplicating protocol so thatthe order of reception of packets and the contents of them on the twocomputers of a duplicated computer system are made identical for packetsof specified communication, and a duplicated computer system withprotocols duplicated by the method.

SUMMARY OF INVENTION

According to one aspect of one or more embodiments of the presentinvention, a protocol duplicating configuration is described for makingidentical an order of reception and contents of packets on first andsecond computers which are connected to a network, having sharedmemories forming a same address space, and make up a duplicated computersystem for packets of specified communications, characterized by havingon each of the first and second computers: queue storing means forstoring packets to be processed in order of being processed; protocolprocessing means that is executed in response to reception of packetsfrom the network; temporary queue holding means for temporarily storingthe packets having been processed by the protocol processing means in aqueue; and virtual queue storing means for storing packets of targetcommunication for the protocol duplication in a queue; wherein theprotocol processing means has packet taking-in means which takes inpackets one by one from the queue storing means and determines whethereach packet taken in is a packet of target communication for theprotocol duplication, communication processing means for performingprotocol processing on the packet, and packet output means foroutputting the packet having been processed by the protocol processingmeans to the temporary queue storing means; and wherein the protocolprocessing means on the second computer takes in the packets stored inthe queue storing means on the second computer one by one by means ofthe packet taking-in means and determines whether each packet taken inis a packet of target communication for the protocol duplication, and ifthe packet is a target packet, discards the packet and passes the packetat the head of the queue in the virtual queue storing means on thesecond computer to the communication processing means.

According to one aspect of one or more embodiments of the presentinvention, a protocol duplicating configuration is described for makingidentical an order of reception and contents of packets on first andsecond computers which are connected to a network, have shared memoriesforming a same address space, and make up a duplicated computer systemfor packets of specified communications, characterized by having on eachof the first and second computers: queue storing means for storingpackets to be processed in order of being processed; protocol processingmeans that is executed in response to reception of packets from thenetwork; temporary queue holding means for temporarily storing thepackets having been processed by the protocol processing means in aqueue; and virtual queue storing means for storing packets of targetcommunication for the protocol duplication in a queue; wherein theprotocol processing means has packet taking-in means which takes inpackets one by one from the queue storing means and determines whethereach packet taken in is a packet of target communication for theprotocol duplication, communication processing means for performingprotocol processing on the packet, and packet output means foroutputting the packet having been processed by the protocol processingmeans to the temporary queue storing means; and wherein the protocolprocessing means on the second computer takes in the packets stored inthe queue storing means on the second computer one by one by means ofthe packet taking-in means and determines whether each packet taken inis a packet of target communication for the protocol duplication, and ifthe packet is a target packet, compares the packet with the packet atthe head of the queue in the virtual queue storing means on the secondcomputer, and only if both packets are identical, discards the packettaken in and passes the packet at the head of the queue in the virtualqueue storing means on the second computer to the communicationprocessing means.

According to one aspect of one or more embodiments of the presentinvention, a method of duplicating protocol is described for makingidentical the order of reception and contents of packets on first andsecond computers which are connected to a network, have shared memoriesforming the same address space and make up a duplicated computer systemfor packets of specified communication, characterized by comprisingsteps executed on each computer; storing packets received from saidnetwork in a queue in order of being processed; executing protocolprocessing in response to the reception of packets from the network;temporally storing packets having been subjected to the protocolprocessing in a temporary queue; and storing packets of targetcommunication for the protocol duplication in a virtual queue; whereinthe protocol processing step comprises: packet taking-in step whichtakes in packets one by one from the queue stored by the step of storingreceived packets in a queue and checks each packet taken in to determinewhether the packet is a target packet for duplication; communicationprocessing step which performs the protocol processing on the packet;and packet outputting step which outputs the packet from thecommunication processing step to the step of temporarily storingprocessed packets in a queue; and takes in packets one by one from thequeue stored by the step of storing received packets in a queue on thefirst computer and checks each packet to determine whether the packet isa target packet for duplication by the packet taking-in step on thefirst computer, and if the packet is a target packet, performing theprotocol processing on the packet by the communication processing stepand in addition storing the packet in the virtual queue on the firstcomputer by the step of storing target packets in a virtual queue on thefirst computer.

The invention of claim 9 is characterized by takeing in the packetsstored in the queue in order and checks each packet taken in todetermine whether the packet is a packet of the specific types ofcommunication by the packet taken-in step on the second computer, and ifthe packet is a packet of the specific types of communication,discarding the packet and passing the packet at the head of the virtualqueue to the communication processing step. According to one aspect ofone or more embodiments of the present invention, a method ofduplicating protocol is described for making identical the order ofreception and contents of packets on first and second computeers whichare connected to a network, have shared memories formin the same addressspace and make up a duplicated computer system for packets of specifiedcommunication, characterized by comprising steps exectued on eachcomputer: storing packets received from said network in a queue in orderof being processed; executing protocol processing in response to thereception of packets from the network; temporally storing packets havingbeen subjected to the protocol processing in a temporary queue; andstoring packets of target communication for the protocol duplication ina virtual queue; wherein the protocol processing step comprises: packettaking-in step which takes in packets one by one from the queue storedby the step of storing received packets in a queue and checks eachpacket taken in to determine whether the packet is a target packet forduplication; communication processing step which performs the protocolprocessing on the packet; and packet outputting step which outputs thepacket from the communication processing step to the step of temporarilystoring processed packets in a queue; and on the second computer, takingin packets one by one from the queue stored by the step of storingreceived packets in a queue on the second computer and checking eachpacket taken in to determine whether the packet is a target packet forduplication by the packet taking-in step on the second computer, and ifthe packet is a target packet, discarding the packet taken in andpassing the packet at the head of the virtual queue on the secondcomputer to the communication processing step.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic block diagram that shows only the part necessaryfor explanation of a duplicated computer system to which the method ofduplicating protocol according to the present invention is applied.

FIG. 2 is a diagram illustrating the principle of the method ofduplicating protocol according to the present invention.

DESCRIPTION OF THE INVENTION

FIG. 1 is a schematic block diagram that shows only the part necessaryfor explanation of a duplicated computer system to which the method ofduplicating protocol according to the present invention can be applied.In FIG. 1, a duplicated computer system 1 consists of two computers 10and 20 that are connected to a network.

The computers 10 and 20 may have the same configuration or differentconfigurations depending on the purpose of use. Since the necessarycomponents are common to both computers 10 and 20, they are assignedcorresponding reference numerals. Each of the computers 10 and 20 may beany type of computer as long as it has a controller 11, 21 including aCPU (Central Processing Unit) and a memory (not shown in the Figure),NIC (Network Interface Card) 12, 22 serving as the interface to thenetwork, shared memory 13, 23 used for communication between thecomputers 10 and 20.

The NICs 12 and 22 are assigned the same MAC (Media Access Control)address Amac so that the computers 10 and 20 appear as the same computerto the network. The shared memories 13 and 23 are dual-port RAMs (RandomAccess Memories), which are used to make possible the inter-computercommunication between the computers 10 and 20 of the order of receptionand contents of packets of target communication to which the protocolduplication of the present invention is applied, and have the sameaddresses assigned to form the same address spaces (referred to asshared memory spaces) on the individual computers. The shared memories13 and 23 are configured so that, when either the computer 10 or 20writes data to its own shared memory space, the same data is written toboth shared memories 13 and 23 substantially at the same time.

Next, the operation of the duplicated computer system 1 is describedbelow. The duplication of protocol according to the present invention isto forcibly make the order of reception and contents of packets on onecomputer identical to those on the other computer. For convenience sake,the case where the order in which packets are subjected to protocolprocessing on the computer 20 is made equal to that on the computer 10is described below. The computer 10 is therefore referred to as theprimary computer, and the computer 20 as the secondary computer.

FIG. 2 is a diagram illustrating the principle of the duplication ofprotocol according to the present invention. In FIG. 2, boxes 100 and200 show the protocol processing performed on the computers 10 and 20 inresponse to the reception of packets from the network, for example. Theprotocol may be any one suitable for the use of the computer system 1,for example TCP (Transfer Control Protocol), but is a standard protocolwith part of it modified as described later in detail. Assignedreference numbers 30 and 40 are queues in which packets to be subjectedto the protocol processing 100 and 200 are stored in order of beingprocessed. Assigned reference numbers 32 and 42 are queues in whichpackets having undergone the protocol processing 100 and 200 aretemporarily stored. Another queue 50 (referred to as a virtual queue)for storing only packets of target communication to which the protocolduplication according to the present invention is applied is generatedin each of the shared memories 13 and 23. Since storage into the sharedmemories 13 and 23 are performed so that the contents in them are alwaysidentical as described above, only one of the shared memories 13 and 23is shown in FIG. 2.

In actual operation, first by the Q (used to stand for a queue)taking-in processing 110 of the protocol processing 100 on the primaryserver 10, a packet is taken in from the queue 30 and checked todetermine whether it is a packet (referred to as a target packet) usedin specified communication (target communications) to which theduplication of protocol according to the present invention is applied.Suppose that the duplicated computer system 1 receives packets from anetwork using TCP for the protocol, for example. In that case, it ispossible to determine whether a packet taken in is a target packet usingthe source MAC address, source IP address, or source port addresscontained in the packet, for example.

Further, the information (filtering information) used to determinewhether a packet taken in is a target packet is not limited to theabove-mentioned source MAC address, source IP address, or source portaddress, and the decision can be made using any information that iscontained in packets and can be used to identify packets. Moreover,since it is anticipated that communication that must be subjected to theprotocol duplication of the present invention is limited according tothe purpose of use of system 1, it is preferable that the manufacturer,vendor, system administrator or the like of the duplicated computersystem 1 write beforehand the information used as the decision criteriato identify target communication or packets in a predeterminednonvolatile storage location of each computer as much as it may beneeded.

In the Q taking-in processing 110 on the computer 10, whether a packettaken in is a target packet is determined using the filteringinformation. If the packet taken in is not a target packet, it is simplypassed to protocol processing 130 in the ordinary manner. If the packetis a target packet, it is passed to the protocol processing 130 and alsoadded to the virtual queue 50 in the shared memory 13. By thisoperation, only target packets, which have been subjected to theprotocol processing 130 on the computer 10, are stored in the virtualqueue 50.

On the other hand, also in the Q taking-in processing 210 on thecomputer 20, a packet is taken in from the queue 40 and the packet takenin is checked to determine whether it is a target packet, in the samemanner as in the Q taking-in processing 110. If the packet taken in isnot a target packet, it is simply passed to the protocol processing 250.If the packet taken in is a target packet, either of the following twomethods may be employed: (1) Discarding the target packet taken in andpassing the packet at the head of the virtual queue 50 to the protocolprocessing 250 or (2) Comparing the target packet taken in with the oneat the head of the virtual queue 50 (230) and, only if they areidentical, discarding the target packet taken in and passing the one atthe head of the virtual queue 50 to the protocol processing 250.

By the processing described above, it is made possible for packets topass through the queues 32 and 42 in the same order with respect totarget packets.

The present invention therefore can provide a method of duplicatingprotocol so that the order of reception and the contents of packets onthe two computers of a duplicated computer system are made identical forpackets of specified communications, and a duplicated computer systemwith protocols duplicated in this manner.

1. A protocol duplicating configuration for making identical an order ofreception and contents of packets on first and second computers whichare connected to a network, have shared memories forming a same addressspace, and make up a duplicated computer system for rackets of specifiedcommunications, characterized by having on each of the first and secondcomputers: queue storing means for storing packets to be processed inorder of being processed; protocol processing means that is executed inresponse to reception of packets from the network; temporary queueholding means for temporarily storing the packets having been processedby the protocol processing means in a queue; and virtual queue storingmeans for storing packets of target communication for the protocolduplication in a queue; wherein the protocol processing means has packettaking-in means which takes in packets one by one from the queue storingmeans and determines whether each packet taken in is a packet of targetcommunication for the protocol duplication, communication processingmeans for performing protocol processing on the packet, and packetoutput means for outputting the packet having been processed by theprotocol processing means to the temporary queue storing means; andwherein the protocol processing means on the second computer takes inthe packets stored in the queue storing means on the second computer oneby one by means of the packet taking-in means and determines whethereach packet taken in is a packet of target communication for theprotocol duplication, and if the packet is a target packet, discards thepacket and passes the packet at the head of the queue in the virtualqueue storing means on the second computer to the communicationprocessing means.
 2. A protocol duplicating configuration for makingidentical an order of reception and contents of packets on first andsecond computers which are connected to a network, have shared memoriesforming a same address space and make up a duplicated computer systemfor packets of specified communications, characterized by having on eachof the first and second computers: queue storing means for storingpackets to be processed in order of being processed; protocol processingmeans that is executed in response to reception of packets from thenetwork; temporary queue holding means for temporarily storing thepackets having been processed by the protocol processing means in aqueue; and virtual queue storing means for storing packets of targetcommunication for the protocol duplication in a queue; wherein theprotocol processing means has packet taking-in means which takes inpackets one by one from the queue storing means and determines whethereach packet taken in is a packet of target communication for theprotocol duplication, communication processing means for performingprotocol processing on the packet, and packet output means foroutputting the packet having been processed by the protocol processingmeans to the temporary queue storing means; and wherein the protocolprocessing means on the second computer takes in the packets stored inthe queue storing means on the second computer one by one by means ofthe packet taking-in means and determines whether each packet taken inis a packet of target communication for the protocol duplication, and ifthe packet is a target packet, compares the packet with the packet atthe head of the queue in the virtual queue storing means on the secondcomputer, and only if both packets are identical, discards the packettaken in and passes the packet at the head of the queue in the virtualqueue storing means on the second computer to the communicationprocessing means.
 3. A method of duplicating protocol for makingidentical the order of reception and contents of packets on first andsecond computers which are connected to a network, have shared memoriesforming the same address space and make up a duplicated computer systemfor packets of specified communication, characterized by comprisingsteps executed on each computer: storing packets received from saidnetwork in a queue in order of being processed; executing protocolprocessing in response to the reception of packets from the network;temporally storing packets having been subjected to the protocolprocessing in a temporary queue; and storing packets of targetcommunication for the protocol duplication in a virtual queue; whereinthe protocol processing step comprises: packet taking-in step whichtakes in packets one by one from the queue stored by the step of storingreceived packets in a queue and checks each packet taken in to determinewhether the packet is a target packet for duplication; communicationprocessing step which performs the protocol processing on the packet;and packet outputting step which outputs the packet from thecommunication processing step to the step of temporarily storingprocessed packets in a queue; and takes in packets one by one from thequeue stored by the step of storing received packets in a queue on thefirst computer and checks each packet to determine whether the packet isa target packet for duplication by the packet taking-in step on thefirst computer, and if the packet is a target packet, performing theprotocol processing on the packet by the communication processing stepand in addition storing the packet in the virtual queue on the firstcomputer by the step of storing target packets in a virtual queue on thefirst computer.
 4. A method of duplicating protocol for making identicalthe order of reception and contents of packets on first and secondcomputers which are connected to a network, have shared memories formingthe same address space and make up a duplicated computer system forpackets of specified communication, characterized by comprising stepsexecuted on each computer: storing packets received from said network ina queue in order of being processed; executing protocol processing inresponse to the reception of packets from the network; temporallystoring packets having been subjected to the protocol processing in atemporary queue; and storing packets of target communication for theprotocol duplication in a virtual queue; wherein the protocol processingstep comprises: packet taking-in step which takes in packets one by onefrom the queue stored by the step of storing received packets in a queueand checks each packet taken in to determine whether the packet is atarget packet for duplication; communication processing step whichperforms the protocol processing on the packet; and packet outputtingstep which outputs the packet from the communication processing step tothe step of temporarily storing processed packets in a queue; and on thesecond computer, taking in packets one by one from the queue stored bythe step of storing received packets in a queue on the second computerand checking each packet taken in to determine whether the packet is atarget packet for duplication by the packet taking-in step on the secondcomputer, and if the packet is a target packet, discarding the packettaken in and passing the packet at the head of the virtual queue on thesecond computer to the communication processing step.